<?php
/*
 * ----------------------------------------------------------------------------
 * "THE BEER-WARE LICENSE" (Revision 42):
 * <r.mujica.91@gmail.com> wrote this file. As long as you retain this notice you
 * can do whatever you want with this stuff. If we meet some day, and you think
 * this stuff is worth it, you can buy me a beer in return
 * ----------------------------------------------------------------------------
 */

# load Smarty library
require_once('frontend/libs/Smarty.class.php');

class Frontend extends Smarty {

  function __construct()
  {
    # Class Constructor.
    # These automatically get set with each new instance.

    $this->Smarty();

    $this->template_dir = 'frontend/templates/';
    $this->compile_dir  = 'frontend/templates_c/';
    $this->config_dir   = 'frontend/configs/';
    $this->cache_dir    = 'frontend/cache/';

    $this->caching = true;
    $this->assign('app_name', 'SmartyAss');
  }
   
  public function displayHeader($pageTitle)
  {
    # This function displays the page's header (top.tpl)
    $this->assign('pageTitle',$pageTitle);
    $this->display('top.tpl');
  }
  
  /*
   * If you want to extend Smarty's capabilities over SmartyAss,
   * like reducing overused code (i.e. displayHeader), you should
   * do it here.
   */

}
?>